
<%@page import="com.portlet.service.nlhasspLocalServiceUtil"%>
<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
<%@page import="java.util.*" %>
<%@page import="com.portlet.model.*"%>
<%@ taglib uri="http://liferay.com/tld/ui" prefix="liferay-ui" %>
<%@ taglib uri="http://alloy.liferay.com/tld/aui" prefix="aui" %>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ page pageEncoding="UTF-8" %>
<portlet:defineObjects />

<h4>Quan ly chi tiet quy cach SP cong ty AnhKhoa Brother</h4>

<%
	int count=nlhasspLocalServiceUtil.getnlhasspsCount();
	List<nlhassp>list=nlhasspLocalServiceUtil.getnlhassps(0,count);
	if(list.size()>0){
%>
	<portlet:actionURL name="editNLQC" var="actionNLURL"></portlet:actionURL>
	<h4>Danh sach Nguyen Lieu</h4>
	<table border="1">
		<tr>
			<th>Ma NLQC</th>
			<th>Ma nguyen lieu</th>
			<th>Ma quy cach</th>
			<th>Quy cach</th>
			<th>Tieu chi kiem tra</th>
			<th>Cach kiem tra</th>
			<th>Delete</th>
		</tr>
		<%for (nlhassp l : list) { %>
		<tr>
			<td>
			<%
				String pk=String.valueOf(l.getMaNLSP());
			%>
				<aui:form action="<%=actionNLURL.toString() %>" method="post">
					<aui:input type="hidden" name="maNLQC" id="maNLQC" value="<%=l.getMaNLSP() %>"/>
					<aui:input type="submit" name="" value="<%=l.getMaNLSP() %>" />
				</aui:form>
				
			</td>
			<td><%=l.getMaNguyenLieu()%></td>
			<td><%=l.getMaQC()%></td>
			<td><%=l.getQuyCach()%></td>
			<td><%=l.getTieuChiKiemTra()%></td>
			<td><%=l.getCachKiemTra()%></td>
			<td>
				<portlet:actionURL var="deleteURL" name="deleteNLQC">
					<portlet:param name="delete" value="<%=pk %>"/>
				</portlet:actionURL>
				<liferay-ui:icon-delete url="<%=deleteURL.toString() %>" />
			</td>
		</tr>
		<%} %>
	</table>
<%}else{ %>
	<h5>Khong co du lieu nao!!</h5>
<%} %>
<portlet:renderURL var="addNLQCURL">
	<portlet:param name="mvcPath" value="/addNLQC.jsp"/>
</portlet:renderURL>
<portlet:renderURL var="viewQCURL">
	<portlet:param name="mvcPath" value="/viewQC.jsp"/>
</portlet:renderURL>
<p>
	<a href="<%=addNLQCURL%>">Them nguyen lieu cho quy cach</a><br>
	<a href="<%=viewQCURL%>">Chuyen sang trang Quy cach san pham</a>
</p>